﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL.User;

namespace WebApplication
{
    public partial class _Default : System.Web.UI.MasterPage
    {
        private UserService userService = new UserService();

        public Models.UserInfo userInfo;

        protected void Page_Load(object sender, EventArgs e)
        {
            // 获取用户信息
            if (Session["UID"] != null)
            {
                int uid = Convert.ToInt32(Session["UID"]);
                userInfo = userService.GetUserInfo(new Models.User { UserID = uid });
                userInfo.AvatarUrl = userInfo.AvatarUrl.Substring(1, userInfo.AvatarUrl.Length - 1);
            }
        }
    }
}